/*
 * ============================================================================
 * = COPYRIGHT
 *          PAX Computer Technology(Shenzhen) CO., LTD PROPRIETARY INFORMATION
 *   This software is supplied under the terms of a license agreement or nondisclosure
 *   agreement with PAX Computer Technology(Shenzhen) CO., LTD and may not be copied or
 *   disclosed except in accordance with the terms in that agreement.
 *     Copyright (C) 2021-? PAX Computer Technology(Shenzhen) CO., LTD All rights reserved.
 * ============================================================================
 */

import 'package:pigeon/pigeon.dart';

@ConfigurePigeon(
  PigeonOptions(
    dartOut: 'lib/auto_pigeon/poslink_sdk_log_set.dart',
    javaOptions: JavaOptions(
      className: 'POSLinkLogSet',
      package: 'com.example.pos_link.pigeon',
    ),
    objcOptions: ObjcOptions(prefix: ''),
    javaOut: './android/src/main/java/com/example/pos_link/pigeon/POSLinkLogSet.java',
  ),
)
enum LogLevel {
  ERROR,
  DEBUG,
}

class LogSetting {
  String? fileName;
  String? filePath;
  int? days;
  bool? enable;
  LogLevel? level;
}

class UploadResult {
  bool? isSuccessful;
  String? sn;
  String? terminalUploadErrorCode;
  String? posLinkUploadErrorCode;
}

@HostApi()
abstract class POSLinkLogSetApi {
  void setLogSetting(LogSetting logSetting);
  @async
  UploadResult upload();
}
